using System;
using System.Xml.Serialization;  // Does XML serializing for a class.
using System.Drawing;            // Required for storing a Bitmap.
using System.IO;			     // Required for using Memory stream objects.
using System.ComponentModel;     // Required for conversion of Bitmap objects.

namespace Smg.Model
{
    // Set this 'Project' class as the root node of any XML file its serialized to.
    [XmlRootAttribute("Project", Namespace = "", IsNullable = false)]
    public class StProject
    {

        /// <summary>
        /// Default constructor for this class (required for serialization).
        /// </summary>
        public StProject()
        {
        }

        // Set this 'DateTimeValue' field to be an attribute of the root node.
        [XmlAttributeAttribute(DataType = "date")]
        public System.DateTime DateTimeValue;

        // By NOT specifing any custom Metadata Attributes, fields will be created
        // as an element by default.
        public string ProjectName;
        public string Url;
        public string FileType;
        public string FilePath;
        public string GenerateMode;

        // Serializes an ArrayList as a "ConnectionString" array of XML elements of custom type ConnectionString named "ConnectionString".
        [XmlArray("DbConnectionStrings"), XmlArrayItem("DbConnectionString", typeof(DbConnectionString))]
        public System.Collections.ArrayList ConnectionString = new System.Collections.ArrayList();

        // Serializes an ArrayList as a "Templates" array of XML elements of type string named "Template".
        [XmlArrayItem(typeof(SqlTemplate))]
        public System.Collections.ArrayList SqlTemplates = new System.Collections.ArrayList();
    }
}
